package cn.example.demo.exception;

import lombok.Data;
import lombok.Getter;

/**
 * @ProjectName: springbootmybatisinvoicings
 * @Package: cn.example.demo.exception
 * @ClassName: APIException
 * @Author: liang
 * @Description: api
 * @Date: 2020/4/11 10:05
 * @Version: 1.0
 */
@Data
public class APIException extends RuntimeException {
    private int code;
    private String msg;

    public APIException() {
        this(1001, "接口错误");
    }

    public APIException(String msg) {
        this(1001, msg);
    }

    public APIException(int code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }
}
